/*
 * VistaDDTA.java
 *
 * Created on 20 de noviembre de 2008, 06:29 AM
 */

package ddta;

import javax.swing.ImageIcon;
import javax.swing.JFrame; 

/**
 *
 * @author  julio
 */
public class VistaDDTA extends JFrame {

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.C2BC33A0-D343-C85B-0B01-7ED571DD3F10]
    // </editor-fold> 
    private DDTA ddta;

    /** Creates new form VistaDDTA */
    public VistaDDTA() {
        initComponents();
        this.ddta = new DDTA();
        ImageIcon icon = new ImageIcon(DDTA.class.getResource("images/logo.jpg"));
        lblLogo.setIcon(icon);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        btnManAgencia = new javax.swing.JButton();
        btnTiposLugares = new javax.swing.JButton();
        btnManGuias = new javax.swing.JButton();
        btnTarifa = new javax.swing.JButton();
        btnExit = new javax.swing.JButton();
        lblLogo = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jLabel1.setText("Agencia Departamental del Departamento Ancash");

        btnManAgencia.setText("Mantenimiento de Agencia");
        btnManAgencia.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnManAgenciaActionPerformed(evt);
            }
        });

        btnTiposLugares.setText("Lugares turisticos");
        btnTiposLugares.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnTiposLugaresActionPerformed(evt);
            }
        });

        btnManGuias.setText("Mantenimiento de Guías");
        btnManGuias.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnManGuiasActionPerformed(evt);
            }
        });

        btnTarifa.setText("Tarifas");
        btnTarifa.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnTarifaActionPerformed(evt);
            }
        });

        btnExit.setText("Salir de DDTA");
        btnExit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnExitActionPerformed(evt);
            }
        });

        lblLogo.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(140, 140, 140)
                        .addComponent(jLabel1))
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(btnManGuias, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 377, Short.MAX_VALUE)
                            .addComponent(btnManAgencia, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 377, Short.MAX_VALUE)
                            .addComponent(btnTiposLugares, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 377, Short.MAX_VALUE)
                            .addComponent(btnTarifa, javax.swing.GroupLayout.DEFAULT_SIZE, 377, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblLogo, javax.swing.GroupLayout.PREFERRED_SIZE, 201, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addContainerGap(506, Short.MAX_VALUE)
                        .addComponent(btnExit)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1)
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(btnTiposLugares, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnTarifa, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(7, 7, 7)
                        .addComponent(btnManGuias, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 14, Short.MAX_VALUE)
                        .addComponent(btnManAgencia, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(35, 35, 35))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(lblLogo, javax.swing.GroupLayout.DEFAULT_SIZE, 246, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnExit, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(53, 53, 53))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

private void btnManAgenciaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnManAgenciaActionPerformed
// TODO add your handling code here:
    VistaAgencias vistaAgencia = new VistaAgencias(this, true, this.ddta);
    vistaAgencia.setVisible(true);
}//GEN-LAST:event_btnManAgenciaActionPerformed

private void btnManGuiasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnManGuiasActionPerformed
// TODO add your handling code here:
    VistaGuias vistaGuias = new VistaGuias(null, true, this.ddta, null);
    vistaGuias.setVisible(true);
}//GEN-LAST:event_btnManGuiasActionPerformed

private void btnTiposLugaresActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnTiposLugaresActionPerformed
// TODO add your handling code here:
    VistaTiposLugares vistasTipos = new VistaTiposLugares(this, true, this.ddta);
    vistasTipos.setVisible(true);
    vistasTipos.dispose();
}//GEN-LAST:event_btnTiposLugaresActionPerformed

private void btnTarifaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnTarifaActionPerformed
// TODO add your handling code here:
    VistaTarifas frmTarifas = new VistaTarifas(null, true, this.ddta);
    frmTarifas.setVisible(true);
}//GEN-LAST:event_btnTarifaActionPerformed

private void btnExitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnExitActionPerformed
// TODO add your handling code here:
    this.setVisible(false);
    System.exit(0);
}//GEN-LAST:event_btnExitActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnExit;
    private javax.swing.JButton btnManAgencia;
    private javax.swing.JButton btnManGuias;
    private javax.swing.JButton btnTarifa;
    private javax.swing.JButton btnTiposLugares;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel lblLogo;
    // End of variables declaration//GEN-END:variables

}
